﻿<!-- #include file="../ding.asp" -->
<!-- #include file="../mymin.asp" -->
<%Call Head()%>
<!--#include file="include.asp"-->
<card title="文章采集"><p>
<%
dim TP,code,Url,TextInfo
TP=request("TP")
if TP<>"" then
	Url=Request.Form("Url")
	code=Request.Form("code")
	if len(url)< 10 then
		Call Error("请正确输入文章地址！")
	End if
	If code="1" Then
		code="UTF-8"
	Else
		code="GB2312"
	End If
	TextInfo=XMLHTTPGet(Url, code)
%>
采集地址:<br/>
<input name="url<%=time_r%>" value="<%=CodeWML(Url)%>"/><br/>
采集内容:<br/><input name="content<%=time_r%>" value="<%=CodeWml(RemoveHTML(TextInfo))%>"/><br/>
----------<br/>
采集到本站:<br/>
标题:<input name="title<%=time_r%>" value=""/><br/>
栏目:<%
Dim rs,sql
Set rs=Server.CreateObject("ADODB.Recordset")
sql = "select classid,class from 74hu_list"
If key=2 And keyids<>"" Then sql="select classid,class from 74hu_list where classid in ("&keyids&")"
rs.open sql,myconn,1,1
If Not rs.eof Then
	w "<select name=""classid"&time_r&""">"
	Do While Not rs.eof
		w "<option value="""&rs("classid")&""">"&nowml(rs("class"))&"</option>"
		rs.movenext
	Loop
	w "</select><br/>"
Else
	w "没有文章栏目<br/>"
End If
%>来源:<input name="author<%=time_r%>" value="<%=adminArticle%>"/><br/>
<anchor>保存内容<go href="../art/save.asp?sid=<%=sid%>" method="post">
<postfield name="test" value="$(content<%=time_r%>)"/>
<postfield name="title" value="$(title<%=time_r%>)"/>
<postfield name="author" value="$(author<%=time_r%>)"/>
<postfield name="classid" value="$(classid<%=time_r%>)"/>
</go></anchor><br/>
<br/>
<%else%>
文章地址:<br/>
<input name="url<%=time_r%>" value="http://"/><br/>
编码:<select name="code" value="1">
<option value="1">UTF-8</option>
<option value="2">Gb2312</option>
</select><br/>
<anchor>获取内容<go href="text.asp?sid=<%=sid%>" method="post">
<postfield name="url" value="$(url<%=time_r%>)"/>
<postfield name="code" value="$(code)"/>
<postfield name="TP" value="1"/></go></anchor><br/>
注:遇到乱码选用其他编码<br/>
<%end if%>
----------<br/>
<%if TP<>"" then%>
<a href="text.asp?sid=<%=sid%>">[返回上级]</a><br/>
<%end if%>
<a href="index.asp?sid=<%=sid%>">[站长工具]</a><%Call last%>